#coding=utf-8

from django.db import models

from PublicTool.BaseModel import  Base_UserModel

class BbsClassType(Base_UserModel):
    name=models.CharField(u"名称",max_length=20)
    code=models.CharField(u'编码',max_length=10)
    urlShow=models.CharField(u"显示",max_length=50)
    urlAdd=models.CharField(u'添加',max_length=50)
    def __unicode__(self):
        return self.name
    class Meta:
        verbose_name = '板块类型'
        verbose_name_plural = '板块类型'



class BbsThemeType(Base_UserModel):
    classId=models.ForeignKey('BbsTheme.BbsClass',verbose_name=u"论坛",null=True,blank=True)
    name=models.CharField(u"名称",max_length=20)
    def __unicode__(self):
        if self.name!=None:
            return self.name
        else:
            return ''
    class Meta:
        verbose_name = '主题分类'
        verbose_name_plural = '主题分类'